<script setup lang="ts">
import { ref, reactive,onMounted } from "vue"
//引入pinia模块
import useInfoStore from "../store/modules/info"

//获取小仓库对象
let infoStore=useInfoStore()
console.log(infoStore)
//pinia里面的状态值可以直接修改或者用action方法异步修改
function addCount(){
  // infoStore.changeCount()
  infoStore.count++
}
</script>

<template>
  <div>
    我是组件1：{{ infoStore.count }}
  </div>
  <button @click="addCount">count累加</button>
  <div>{{ infoStore.total }}</div>
</template>

<style scoped></style>
